using NUnit.Framework;
namespace Eto.Test.UnitTests.Drawing
{
	[TestFixture]
	public class PenTests : TestBase
	{
		/// <summary>
		/// Issue 1066
		/// </summary>
		[Test]
		public void PenShouldReturnBrush()
		{
			var pen = new Pen(Colors.Blue);
			Assert.That(pen.Brush, Is.Not.Null, "#1.1");
			Assert.That(pen.Brush, Is.InstanceOf<SolidBrush>());
			Assert.That(((SolidBrush)pen.Brush).Color, Is.EqualTo(Colors.Blue), "#1.3");

			var brush = new SolidBrush(Colors.Blue);
			pen = new Pen(brush);
			Assert.That(pen.Brush, Is.Not.Null, "#2.1");
			Assert.That(brush, Is.SameAs(pen.Brush), "#2.2");
		}
	}
}
